//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { UserScore, UserScoreResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooUserScoreList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<UserScoreResponse>(`/uctoo/user_score/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooUserScore = async (id: string) => {
  return requestClient.get<UserScore>(`/uctoo/user_score/${id}`);
};

export const adductooUserScore = async (data: Partial<UserScore>) => {
  return requestClient.post<UserScore>('/uctoo/user_score/add', data);
};

export const edituctooUserScore = async (data: Partial<UserScore>) => {
  return requestClient.post<UserScore>('/uctoo/user_score/edit', data);
};

export const deleteuctooUserScore = async (id: string) => {
  return requestClient.post<any>('/uctoo/user_score/del', { id });
};
